package com.bestcem.xm.member.grpc.service.param.extendfield;

import com.bestcem.xm.common.core.constant.RegTypes;
import com.bestcem.xm.member.enums.MemberTypeEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
 * @author dc.wang <dc.wang@idiaoyan.com>
 * @version V1.0
 * @description TODO
 * @date 2021/7/21
 */
@Getter
@Setter
@ToString
public class BatchUpdateFieldsParam {
    /**
     * 企业标识
     */
    @NotBlank(message = "企业标识不能为空")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "企业标识格式错误")
    private String orgId;

    /**
     * 联系人类型
     */
    @NotNull(message = "联系人类型不存在")
    private MemberTypeEnum memberTypeEnum;

    /**
     * 扩展字段插入集合
     */
    @Valid
    private List<InsertFieldParam> insertFieldParams;

    /**
     * 扩展字段更新集合
     */
    @Valid
    private List<UpdateFieldParam> updateFieldParams;

    /**
     * 扩展字段删除标识集合
     */
    private List<String> deleteFieldIds;
}
